﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
public partial class Admin_login : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
  
    protected void LoginButton_Click1(object sender, EventArgs e)
    {


        DB yap = new DB();
        string kadi, sifre;
        kadi = txtkadi.Text.Trim();
        sifre = FormsAuthentication.HashPasswordForStoringInConfigFile(txtpass.Text, "sha1");
        if (yap.GirisKontrol(kadi, sifre))
        {
            FormsAuthentication.RedirectFromLoginPage(kadi, true);
            Response.Redirect("~/acsadmin/adminmain.aspx");
        }

    }
}
